package day6;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrTest {
    public static void main(String[] args) {
        //常量池
        //不变性
        String s="ZhaoSenglei";
        String s2=s;
        s="赵森磊";
        System.out.println(s2);
        s=s.concat("朱槿花");//拼接
        System.out.println(s);
        s2=s2.toUpperCase();
        System.out.println(s2);
        //byte数组作为参数的构造方法
        byte []b=new byte[]{65,66,67};
        char c[]={'完','龑','f'};
        System.out.println(c);
        System.out.println(b);
        String s3=new String(b);
        System.out.println(s3);
        System.out.println(">>>>>>>>>>>>>>>>>>>>>");
        String s4="kangxinwei is a good man";
        String[] ar = s4.split(" ");
//        for (int i = 0; i < ar.length; i++) {
//            String s5=ar[i];
//        }
        for(String s5:ar){//增强For
            System.out.println(s5);
        }
    }
}
